﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;

namespace FormTest {
    public partial class Form1 : Form {
        public Form1() {
            InitializeComponent();

            string pattern = @"^[d]{2}[-\.\/][M]{2}[-\.\/][y]{4}( [H]{2}:[m]{2})?$";

            this.label1.Text = string.IsNullOrEmpty(Regex.Match("dd-MM-yyyy", pattern).Groups[1].Value).ToString();

        }
    }
}
